home *** CD-ROM | disk | FTP | other *** search
- DIR
-
- Displays a sorted list of the files in a directory.
-
- Format
-
- DIR [<dir | pattern>] [OPT A | I | AI | D | F] [ALL] [DIRS] [FILES] [INTER]
-
- Template
-
- DIR,OPT/K,ALL/S,DIRS/S,FILES/S,INTER/S
-
- Location
-
- C:
-
- DIR displays the file and directory names contained in the specified
- directory or the current directory. Directories are listed first, followed by
- an alphabetical list of the files in two columns. Pressing Ctrl+C aborts a
- directory listing.
-
- The options are:
-
- ALL
-
- Displays all subdirectories and their files.
-
- DIRS
-
- Displays only directories.
-
- FILES
-
- Displays only files.
-
- INTER
-
- Enters an interactive listing mode.
-
- The ALL, DIRS, FILES, and INTER keywords supersede the OPT A, D, F, and I
- options, respectively. The older keywords are retained for compatibility with
- earlier versions of AmigaDOS. Do not use OPT with the full keywords - ALL,
- DIRS, FILES, or INTER.
-
- Interactive listing mode stops after each name to display a question mark at
- which you can enter commands. The acceptable responses are shown below:
-
- Press Return
-
- Displays the next name on the list.
-
- E
-
- Enters a directory; the files in that directory are displayed.
-
- B
-
- Goes back one directory level.
-
- DEL or DELETE
-
- Deletes a file or empty directory. DEL does not refer to the Del key; enter
- the letters D, E, and L.
-
- T
-
- Types the contents of a file.
-
- C or COMMAND
-
- Allows you to enter additional AmigaDOS commands.
-
- Q
-
- Quits interactive editing.
-
- ?
-
- Displays a list of the available interactive-mode commands.
-
- The COMMAND option allows almost any AmigaDOS command to be executed during
- the interactive directory list. To issue a command, enter C (or COMMAND) at
- the question mark prompt. DIR asks you for the command. Enter the desired
- command, then press Return. The command is executed and DIR continues. You
- can also combine the C and the command on one line by putting the command in
- quotation marks following the C.
-
- For example,
-
- ? C "type prefs.info hex"
-
- is equivalent to pressing Q to exit interactive listing mode and return to a
- regular Shell prompt, then entering:
-
- 1> TYPE Prefs.info HEX
-
- to display the Prefs.info file on the screen in hexadecimal format.
-
- Formatting a disk from the DIR interactive mode is not recommended since the
- format takes place immediately, without any confirmation requesters
- appearing. Do not start another interactive DIR from interactive mode since
- it results in garbled output.
-
- Example 1:
-
- 1> DIR Workbench:
-
- displays a list of the directories and files on the Workbench disk.
-
- Example 2:
-
- 1> DIR MyDisk:#?.memo
-
- displays all the directories and files on MyDisk that end in .memo.
-
- Example 3:
-
- 1> DIR Extras: ALL
-
- displays the complete contents of the Extras drawer: all directories, all
- subdirectories, and all files, including those in the subdirectories.
-
- Example 4:
-
- 1> DIR Workbench: DIRS
-
- displays only the directories on Workbench.
-
- Example 5:
-
- 1> DIR Workbench: INTER
-
- begins an interactive list of the contents of the Workbench disk.
-
- For more examples using DIR, see Chapter 8.
-